package com.zed.api.games;

import org.springframework.context.ApplicationContext;

import java.util.List;

/**
 * 游戏构建器
 *
 * @author Zed
 */
public interface GameBuilder<S, A extends Action> {

    /**
     * 游戏名称
     *
     * @return {@link GameBuilder}
     */
    GameBuilder<S, A> name(String name);

    /**
     * 添加游戏关卡
     *
     * @param gameLevel {@link GameLevel}
     * @return {@link GameBuilder}
     */
    GameBuilder<S, A> addGameLevel(GameLevel<S, A> gameLevel);

    /**
     * 移除关卡
     *
     * @param gameLevel {@link GameLevel},游戏关卡
     * @return {@link GameBuilder}
     */
    GameBuilder<S, A> removeGameLevel(GameLevel<S, A> gameLevel);

    /**
     * 获取主键
     *
     * @return {@link String}
     */
    String getId();

    /**
     * 获取名称
     *
     * @return {@link String}
     */
    String getName();

    /**
     * 获取游戏关卡
     *
     * @return {@link List}
     */
    List<GameLevel<S, A>> getGameLevels();


    /**
     * 构建
     *
     * @return {@link Game}
     */
    Game build(ApplicationContext applicationContext);


}
